package com.apiit.webserviceclient.activities;

import com.apiit.webserviceclient.R;
import com.apiit.webserviceclient.R.layout;
import com.apiit.webserviceclient.R.menu;

import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TextView;

public class LecturerProfile extends Activity implements OnClickListener {
	
	Button back;
	TextView txtLoginID;
	TextView txtname;
	TextView txtemail;
	TextView txtcontactno;
	TextView txtskill1,txtskill2,txtskill3,txtskill4,txtskill5;



	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_lecturer_profile);
		
		txtLoginID = (TextView) findViewById(R.id.txtPagollecID);
		txtname = (TextView) findViewById(R.id.txtPagollecName);
		txtemail = (TextView) findViewById(R.id.txtlecemail);
		txtcontactno = (TextView) findViewById(R.id.txtleccontactno);
		txtskill1 = (TextView) findViewById(R.id.txtlecskill1);
		txtskill2 = (TextView) findViewById(R.id.txtlecskill2);
		txtskill3 = (TextView) findViewById(R.id.txtlecskill3);
		txtskill4 = (TextView) findViewById(R.id.txtlecskill4);
		txtskill5 = (TextView) findViewById(R.id.txtlecskill5);
		back = (Button) findViewById(R.id.btnback);
		back.setOnClickListener(this);
		
		Intent intename = getIntent();
		String lecturerIDVal = intename.getStringExtra("lecturerID").replaceAll("&lt;", "").replaceAll("&gt;", "");
		String nameVal = intename.getStringExtra("name").replaceAll("&lt;", "").replaceAll("&gt;", "");
		String email = intename.getStringExtra("email").replaceAll("&lt;", "").replaceAll("&gt;", "");
		String contactNo = intename.getStringExtra("contactNo").replaceAll("&lt;", "").replaceAll("&gt;", "");
		String skill1val = intename.getStringExtra("skill1").replaceAll("&lt;", "").replaceAll("&gt;", "");
		String skill2val = intename.getStringExtra("skill2").replaceAll("&lt;", "").replaceAll("&gt;", "");
		String skill3val = intename.getStringExtra("skill3").replaceAll("&lt;", "").replaceAll("&gt;", "");
		String skill4val = intename.getStringExtra("skill4").replaceAll("&lt;", "").replaceAll("&gt;", "");
		String skill5val = intename.getStringExtra("skill5").replaceAll("&lt;", "").replaceAll("&gt;", "");

		txtLoginID.setText(lecturerIDVal);
		txtname.setText(nameVal);
		txtemail.setText(email);
		txtcontactno.setText(contactNo);
		txtskill1.setText(skill1val);
		txtskill2.setText(skill2val);
		txtskill3.setText(skill3val);
		txtskill4.setText(skill4val);
		txtskill5.setText(skill5val);
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.lecturer_profile, menu);
		return true;
	}

	@Override
	public void onClick(View v) {
		// TODO Auto-generated method stub
		if (v == back) {
			Intent i = new Intent(this, LecturerPagol.class);
			startActivity(i);
		}
	}

}
